<script setup>
// 引入 api
import { computed, ref } from "vue"

// 样式
const height = ref('200px')
const width = ref('200px')

// 点击函数
function btn1() {
    height.value = "300px"
    width.value = '300px'
}

function btn2() {
    height.value = "200px"
    width.value = '200px'
}
</script>

<template>
    <!-- 标签 -->
    <img src="../../../assets/logo.svg" :style="[{ height }, { width }]">
    <!-- 按钮 -->
    <input type="button" value="扩大" @click="btn1">
    <input type="button" value="缩小" @click="btn2">
</template>